<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .w {
            width: 1200px;
            margin: auto;
        }



        .a {
            width: 100%;
            height: 100px;
            background-color: #f00;
        }


        .b {
            height: 200px;
            background-color: #ff0;
        }


        .c img {
            width: 100%;
        }
    </style>
</head>

<body>


    <!-- 
        每个电脑的屏幕大小都不一样
        最终的解决方案   给一个固定的宽度显示在网页的中间___版心  效果就是屏幕越大两边留白就越多

        外面的色块铺满整个浏览器的宽度   里面的内容又要居中     套两层盒子
     -->

    <div class="a">
        <div class="w">1111111111</div>
    </div>


    <div class="b">
        <div class="w">2222222222222</div>
    </div>


    <div class="c">
        <img src="https://imgcps.jd.com/img-cubic/creative_server_cia_jdcloud/v2/2000367/100016587583/FocusFullshop/CkNqZnMvdDEvMTgyMzEwLzM5LzMwMjkxLzQyNzg2LzYzNmFhZjI4RTNjNmJmNWE3LzgyMjgxYTFjMWE5ODM0NjIucG5nEgkyLXR5XzBfNTMwAjjvi3pCHQoZ5bGx5rC06JOd54mZL-aXoOe6v-iAs-acuhABQhkKFeWlvei0p-Wkp-i1j-W8gOWQr-S4rRACQhAKDOeri-WNs-aKoui0rRAGQgoKBuWKm-iNkBAHWL-G0Mv0Ag/cr/s/q.jpg"
            alt="">
    </div>

</body>

</html>